package org.yzz.base.util;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 后台返给前端的东西,属性值要和前端对上
 * 加泛型是为了之后使用时可以根据需求选择不同的类型
 * @param <T>
 */
@Data
public class PageInfo<T> {
    private Long total=0L;
    private List<T> dataList =new ArrayList();

    private Map<String,Object> data;

    public PageInfo(Long total, List<T> rows,Map<String,Object> map) {
        this.total = total;
        this.dataList = rows;
        this.data=map;
    }
    public PageInfo(Long total, List<T> rows) {
        this.total = total;
        this.dataList = rows;
    }
    public PageInfo(){}
}
